/*
 * Software for Interactive Project Pool Game
 * Columbia University. New York, 2008
 * Authors:
 *   Abdulhamid Ghandour
 *   Thomas John
 *   Jaime Peretzman
 *   Bharadwaj Vellore
 * 
 * Desc:
 */
#ifndef _GAME_CONFIG_H
#define _GAME_CONFIG_H

#include "fixedpoint.h"

extern long long tableStartX;
extern long long tableEndX;
extern long long tableStartY;
extern long long tableEndY;

#define TABLE_START_X          INT2FP(tableStartX)
#define TABLE_START_Y          INT2FP(tableStartY)
#define TABLE_END_X            INT2FP(tableEndX)
#define TABLE_END_Y            INT2FP(tableEndY)
#define TABLE_WIDTH            INT2FP(tableEndX - tableStartX)
#define TABLE_HEIGHT           INT2FP(tableEndY - tableStartY)

#define TIME_STEP              20 /* in milliseconds? */
#define RAW_POCKET_RADIUS      14
#define NUM_BALLS              7
#define BALL_RADIUS            INT2FP(14LL)

#define POCKET_RADIUS          INT2FP(10LL)

#define TOP_LEFT_POCKET_X      TABLE_START_X
#define TOP_LEFT_POCKET_Y      TABLE_START_Y
#define TOP_RIGHT_POCKET_X     TABLE_END_X
#define TOP_RIGHT_POCKET_Y     TABLE_START_Y
#define TOP_MID_POCKET_X       FPDIV((TABLE_START_X + TABLE_END_X),INT2FP(2LL));
#define TOP_MID_POCKET_Y       TABLE_START_Y
#define BOTTOM_LEFT_POCKET_X   TABLE_START_X
#define BOTTOM_LEFT_POCKET_Y   TABLE_END_Y
#define BOTTOM_RIGHT_POCKET_X  TABLE_END_X
#define BOTTOM_RIGHT_POCKET_Y  TABLE_END_Y
#define BOTTOM_MID_POCKET_X    TABLE_START_X + FPDIV(TABLE_WIDTH,INT2FP(2LL)) \
                                - INT2FP(1LL)
#define BOTTOM_MID_POCKET_Y    TABLE_END_Y

#define DAMPING_COEFF          FPDIV(INT2FP(2LL),INT2FP(100LL))

#endif /* _GAME_CONFIG_H */
